<template>
  <view>
    <u-navbar back-text="返回" :title="title"></u-navbar>
    <u-card :show-head="false">
      <view slot="body">
        <u-parse v-if="type==1" :html="config.userAgreement"></u-parse>
        <u-parse v-if="type==2" :html="config.privacyAgreement"></u-parse>
      </view>
    </u-card>
  </view>
</template>

<script>
import {allWechatConfigs} from "@/api/system/wechat_config";

export default {
  data() {
    return {
      title: '',
      type: '',
      config: {},
    }
  },
  onLoad(options) {
    this.title = options.title
    this.type = options.type
    allWechatConfigs().then(re => {
      this.config = re.data[0]
      console.log(this.config)
    })
  }
}
</script>

